//
//  DiTuiCell.m
//  QoilPublic
//
//  Created by SunChao on 2018/1/24.
//  Copyright © 2018年 孙超. All rights reserved.
//

#import "DiTuiCell.h"

@implementation DiTuiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setFrame:(CGRect)frame
{
    CGFloat kTableViewCellMargin = 10;
    frame.size.height -= kTableViewCellMargin;
    [super setFrame:frame];
    
}
- (void)setLoginModel:(QLoginModel *)loginModel{
    _loginModel = loginModel;
    if(_loginModel){
    
            if([_loginModel.marketingStatus isEqualToString:@"0"]){
                _leftLabel.text = @"我的收益";
                _rightLabel.text = [NSString stringWithFormat:@"￥%@",_loginModel.marketingAmount];
            }else if ([_loginModel.marketingStatus isEqualToString:@"1"]){
                _leftLabel.text = @"申请成为兼职地推";
                _rightLabel.text = [NSString stringWithFormat:@"您已被删除"];
            }else if ([_loginModel.marketingStatus isEqualToString:@"2"]){
                _leftLabel.text = @"申请成为兼职地推";
                _rightLabel.text = [NSString stringWithFormat:@"您已被禁用"];
            }else if ([_loginModel.marketingStatus isEqualToString:@"3"]){
                _leftLabel.text = @"申请成为兼职地推";
                _rightLabel.text = [NSString stringWithFormat:@"待审核"];
            }else if ([_loginModel.marketingStatus isEqualToString:@"4"]){
                _leftLabel.text = @"申请成为兼职地推";
                _rightLabel.text = [NSString stringWithFormat:@"审核不通过"];
            }else if ([_loginModel.marketingStatus isEqualToString:@"99"]){
                _leftLabel.text = @"申请成为兼职地推";
                _rightLabel.text = @"";
            }
    
    
        else if([QUserInfo sharedInfo].loginModel && !_loginModel){
//            _userLabel.hidden = NO;
//            _userLabel.text = [QUserInfo sharedInfo].loginModel.nickName;
//            _loginButton.hidden = YES;
//            [self.headButton setImage:[UIImage imageNamed:@"head_icon"] forState:UIControlStateNormal];
//            _leftLabel.text = @"申请成为兼职地推";
//            _rightLabel.text = @">";
        }else if (![QUserInfo sharedInfo].loginModel){
//            _userLabel.hidden = YES;
//            _loginButton.hidden = NO;
//            _leftLabel.text = @"申请成为兼职地推";
//            _rightLabel.text = @">";
//            [self.headButton setImage:[UIImage imageNamed:@"head_icon"] forState:UIControlStateNormal];
//            _headFrameImage.hidden = YES;
        }
    }
}
@end
